import Vue from 'vue'
import Router from 'vue-router'
const login = ()=> import('@/components/login/login')
import themeNavPageRouter from './routers/theme-nav-page-router.js'
import indexRouter from './routers/index_router.js'
import dynamicRouter from './routers/dynamic_router.js'
import issueRouter from './routers/issue_router.js'
import userRouter from './routers/user_router.js'
import reportRouter from './routers/report_router.js'
import wisdom from './routers/wisdom-site-router.js'
Vue.use(Router)

export default new Router({
  routes: [
    {path:'/login',name:'登录',component:login},
    ...themeNavPageRouter,
    ...indexRouter,
    ...dynamicRouter,
    ...issueRouter,
    ...userRouter,
    ...reportRouter,
    ...wisdom
  ],
  scrollBehavior (to, from, savedPosition) {
    // return 期望滚动到哪个的位置
    return { x: 0, y: 0 }
  }
})
